import { createRouter, createWebHashHistory } from 'vue-router'
import Layout from '../layout/index.vue'

const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import('../views/index/login.vue')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/index/register.vue')
  },
  {
    path: '/home',
    name: 'home',
    component: Layout,
    children: [
      { path: 'hero', name: 'hero', component: () => import('../views/manage/heroList.vue') }
    ]
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})
console.log(routes);
export default router
